
class MyFansModel {
  List<MyFansItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  MyFansModel({this.list, this.pageNum, this.pageSize, this.total, this.totalPage});

  MyFansModel.fromJson(Map<String, dynamic> json) {
    list = json["list"] == null ? null : (json["list"] as List).map((e) => MyFansItem.fromJson(e)).toList();
    pageNum = json["pageNum"];
    pageSize = json["pageSize"];
    total = json["total"];
    totalPage = json["totalPage"];
  }

  static List<MyFansModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(MyFansModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }

  MyFansModel copyWith({
    List<MyFansItem>? list,
    int? pageNum,
    int? pageSize,
    int? total,
    int? totalPage,
  }) => MyFansModel(
    list: list ?? this.list,
    pageNum: pageNum ?? this.pageNum,
    pageSize: pageSize ?? this.pageSize,
    total: total ?? this.total,
    totalPage: totalPage ?? this.totalPage,
  );
}

class MyFansItem {
  String? avatarImg;
  String? createTime;
  int? fansCount;
  int? id;
  int? levelId;
  String? levelName;
  String? nickName;
  String? userTel;

  MyFansItem({this.avatarImg, this.createTime, this.fansCount, this.id, this.levelId, this.levelName, this.nickName, this.userTel});

  MyFansItem.fromJson(Map<String, dynamic> json) {
    avatarImg = json["avatarImg"];
    createTime = json["createTime"];
    fansCount = json["fansCount"];
    id = json["id"];
    levelId = json["levelId"];
    levelName = json["levelName"];
    nickName = json["nickName"];
    userTel = json["userTel"];
  }

  static List<MyFansItem> fromList(List<Map<String, dynamic>> list) {
    return list.map(MyFansItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["avatarImg"] = avatarImg;
    _data["createTime"] = createTime;
    _data["fansCount"] = fansCount;
    _data["id"] = id;
    _data["levelId"] = levelId;
    _data["levelName"] = levelName;
    _data["nickName"] = nickName;
    _data["userTel"] = userTel;
    return _data;
  }

  MyFansItem copyWith({
    String? avatarImg,
    String? createTime,
    int? fansCount,
    int? id,
    int? levelId,
    String? levelName,
    String? nickName,
    String? userTel,
  }) => MyFansItem(
    avatarImg: avatarImg ?? this.avatarImg,
    createTime: createTime ?? this.createTime,
    fansCount: fansCount ?? this.fansCount,
    id: id ?? this.id,
    levelId: levelId ?? this.levelId,
    levelName: levelName ?? this.levelName,
    nickName: nickName ?? this.nickName,
    userTel: userTel ?? this.userTel,
  );
}